Chatbot View Model
ViewModel responsible for managing chatbot interactions. Handles message processing, chat logs, and user interactions.
Functions
Link copied to clipboard
Link copied to clipboard
Adds a chat log to the repository and clears the current branch messages.
fun addCurrentBranchLog(messageList: List<ChatMessage>, logType: ChatBranch, toBeCompleted: Date? = null)
Creates and adds a new chat log based on a list of messages. It makes a copy of the provided message list before storing it.
Link copied to clipboard
Retrieves a list of all available chat branches.
Link copied to clipboard
Retrieves the current step in the chatbot's branching logic.
Link copied to clipboard
Link copied to clipboard
Retrieves the currently active chat branch or dialogue.
Link copied to clipboard
Sends a completion date for a chat log if applicable.
Link copied to clipboard
Sends a message from the user to the chatbot. Also triggers the chatbot's response simulation.